package de.tu_darmstadt.gdi1.xcom.model.elements;

import de.tu_darmstadt.gdi1.framework.utils.Point;

public class Switch extends Static {

	/**
	 * 
	 */
	private static final long serialVersionUID = -366302421515492760L;
	private Point door;
	
	private boolean locked;
	public Switch(Point doors, boolean locked){
		this.door = doors;
		this.locked = locked;
	}
	@Override
	public GameElement clone() {
		return new Switch(door, locked);
	}

	@Override
	public boolean isSolid() {
		return true;
	}

	@Override
	public boolean isWall() {
		return true;
	}

	public boolean isLocked() {
		return locked;
	}
	
	public boolean changeState(){
		locked = !locked;
		return locked;
	}
	
	public Point getDoor(){
		return door;
	}
	public void setDoors(Point doors) {
		this.door = doors;
	}
	
	public String toString() {
		return "c";
	}
}
